#ifndef __MYMATH_H
#define __MYMATH_H

struct compx 
{
	long int real;
	long int imag;
};								

struct compw 
{
	float real;
	float imag;
};


int fft(int power, struct compx *array);
float InvSqrt(float x);
long int sqrt_ab(long int a, long int b);


#define calculate_power(v, u) do \
{\
	(v) = (u).real*(u).real + (u).imag*(u).imag;\
}while(0);

/*
#define calculate_module(v, u) do \
{\
	calculate_power(v, u);		\
	(v) = InvSqrt(v);			\
}while(0);
*/
#define calculate_module(v, u) do \
{\
	calculate_power(v, u);		\
	(v) = InvSqrt(v);			\
}while(0);


#endif

